<style>
	#mostviewed .box3{
		float:left;margin-left:5px;
	}
	#mostviewed .box3 .box_image{
		 height:90px; display: table-cell; vertical-align:middle;
	}
</style>
<!--Box-->
<div class="caption_box icon_title" style="background: #FFAA55; margin-bottom:5px;">
    <div style="float:left; width:85%">
        <span style="color:#FFFFFF; padding:8px;"><?php echo $this->translator()->widget('widget_enterprise_most_viewed');?></span>
    </div>    
</div>

<div style="clear:both;"></div>
<div id="mostviewed">
    <?php $w_i = 0;foreach($this->enterprises as $enterprise):?>
    <?php
        /**
        * Check image exist directory
        **/
        $file_noimage = $this->APP_STATIC_SERVER."/images/logos/no-logo.jpg";
        $file = $this->APP_STATIC_SERVER."/images/logos/".$enterprise->id.'.jpg';
        $path = str_replace($this->APP_STATIC_SERVER,getcwd(),$file);
        $urlImage = is_file($path)?$file:$file_noimage;

        //Param url detail
        $arrRouteDetail = array(
            'enterprise_id' => $enterprise->id,
            'enterprise_name' => Tomato_Utility_String::removeSign($enterprise->company_name_en, '-', true),
        );

        $enterprise_name = ($this->lang == 'vi_VN')?$enterprise->company_name_vn:$enterprise->company_name_en;
    ?>
    <?php if($w_i%3 == 0):?><div style="display:table; width:100%; margin: 2px 0 5px 0;"><?php endif;?>
    	<div class="box3">
	        <div class="box_image">
	            <a href="<?php echo $this->url($arrRouteDetail,'bizprofile_enterprise_index');?>">
	                <img width="90" src="<?php echo $urlImage;?>" class="item_img" title="<?php echo $enterprise_name;?>" alt="<?php echo $enterprise_name;?>">
	            </a>
	        </div>
        </div>
    <?php $w_i++; if($w_i%3 == 0):?></div><?php endif;?>
    <?php endforeach;?>
    <?php if($w_i%3 != 0):?></div><?php endif;?>
</div>